<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>后台管理系统</title>



  <link rel="stylesheet" href="css/modules/code.css">
  <link rel="stylesheet" href="css/modules/laydate/default/laydate.css">
  <link rel="stylesheet" href="css/modules/layer/default/layer.css">
  <link rel="stylesheet" href="css/layui.css">
  <link rel="stylesheet" href="css/bootstrap.min.css">
  <link rel="stylesheet" href="css/backindex.css">
  <link rel="stylesheet" href="css/modalDetails.css">

</head>

<body>

  <div class="layui-layout layui-layout-admin">
    <div class="layui-header">
      <div class="layui-logo layui-hide-xs layui-bg-black">后台管理系统</div>
      <!-- 头部区域（可配合layui 已有的水平导航） -->
      <ul class="layui-nav layui-layout-left">
        <!-- 移动端显示 -->
        <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
          <i class="layui-icon layui-icon-spread-left"></i>
        </li>

        {% block one%}

        <li class="layui-nav-item layui-hide-xs"><a href="#" type="button" data-toggle="modal"
            data-target="#staticBackdrop">热门评测</a></li>

        {% endblock %}
        <li class="layui-nav-item layui-hide-xs"><a href="">发布评测教程</a></li>
        <li class="layui-nav-item layui-hide-xs"><a href="" type="button" data-toggle="modal" data-target="#staticcc">
            发布其它评测
          </a></li>
        <li class="layui-nav-item">
          <a href="javascript:;">其它选项</a>
          <dl class="layui-nav-child">
            <dd><a href="">问卷调研</a></dd>
            <dd><a href="">学术调研</a></dd>
            <dd><a href="">投票评选</a></dd>
          </dl>
        </li>
      </ul>
      <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item layui-hide layui-show-md-inline-block">
          <a href="javascript:;">
            <img src="img/521.jpg"
              class="layui-nav-img">
            小徐同学
          </a>
          <dl class="layui-nav-child">
            <dd><a href="">修改个人资料</a></dd>
            <dd><a href="">已评测</a></dd>
            <dd><a href="">退出登录</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
          <a href="javascript:;">
            <i class="layui-icon layui-icon-more-vertical"></i>
          </a>
        </li>
      </ul>
    </div>

    <!-- 发布其他评测 -->
    <form id="staticbackForm" action="/staticbackEvaluationDone" method="POST">
    <div class="modal fade " id="staticcc" data-backdrop="static" data-keyboard="false" tabindex="-1"
      aria-labelledby="staticBackdropLabel" aria-hidden="true">
      <div class="modal-dialog modal-xl">
        <div class="modal-content">
          <div class="modal-header">
            <h5 class="modal-title" id="staticBackdropLabel">其它评测</h5>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          <div class="modal-body">
            <p>
              评测名称:
              <input type="text" id="staticbackname" name="staticbackname" placeholder="必填❗">
            </p>
            <p>
              评测题目:
              <input type="text" id="staticbackone" name="staticbackone" placeholder="必填❗">
            </p>
            <p>
              评测题目:
              <input type="text" id="staticbacktwo" name="staticbacktwo" placeholder="必填❗">

            </p>
            <p>
              评测题目:
              <input type="text" id="staticbackthre" name="staticbackthre" placeholder="必填❗">

            </p>
            <p>
              评测题目:
              <input type="text" id="staticbackfour" name="staticbackfour" placeholder="必填❗">

            </p>
            <p>
              评测题目:
              <input type="text" id="staticbackfive" name="staticbackfive" placeholder="必填❗">
            </p>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary" onclick="staticbackGo()">发布</button>
          </div>
        </div>
      </div>
    </div>
  </form>
    <div class="layui-side layui-bg-black">
      <div class="layui-side-scroll">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <ul class="layui-nav layui-nav-tree" lay-filter="test">
          <li class="layui-nav-item layui-nav-itemed">
            <a class="" href="javascript:;">热门评测</a>
            <dl class="layui-nav-child">

              <dd><a href="/movie">电影评测</a></dd>

              <dd><a href="/software" type="buton">城市评测</a></dd>

              <dd><a href="/modelReviews">模特评测</a></dd>

              <dd><a href="/carRvaluation">汽车评测</a></dd>
            </dl>
          </li>
          <li class="layui-nav-item">
            <a href="javascript:;">解决方案</a>
            <dl class="layui-nav-child">
              <dd><a href="javascript:;">评测发生异常</a></dd>
              <dd><a href="javascript:;">用户登录异常</a></dd>
            </dl>
          </li>
          <li class="layui-nav-item"><a href="javascript:;">开发者权限</a></li>
          <li class="layui-nav-item"><a href="">提交Bug</a></li>
        </ul>
      </div>
    </div>




    <div id="InheritanceBox">

      {% block content %}
      <img id="cardl" src="img/520.jpg" alt="">

      {% endblock %}
    </div><!-- InheritanceBox -->

    <script src="js/layui.js"></script>
    <script src="js/jquery-3.6.0.min.js"></script>
    <script src="js/bootstrap.min.js"></script>

    <script>
      //JS 
      layui.use(['element', 'layer', 'util'], function () {
        var element = layui.element
          , layer = layui.layer
          , util = layui.util
          , $ = layui.$;

        //头部事件
        util.event('lay-header-event', {
          //左侧菜单事件
          menuLeft: function (othis) {
            layer.msg('展开左侧菜单的操作', { icon: 0 });
          }
          , menuRight: function () {
            layer.open({
              type: 1
              , content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
              , area: ['260px', '100%']
              , offset: 'rt' //右上角
              , anim: 5
              , shadeClose: true
            });
          }
        });

      });

      //电影评测表
      function movieGo() {
        let movieone = $('#movieone').val();
        let movietwo = $('#movietwo').val();
        let moviethre = $('#moviethre').val();
        let moviefour = $('#moviefour').val();
        let moviefive = $('#moviefive').val();
        if (movieone.length > 0 && movietwo.length > 0 && moviethre.length >0 && moviefour.length >0 && moviefive.length > 0) {
          $.ajax({
            url: "/movieEvaluationDone",
            type: "POST",
            data: $('#movieForm').serialize(),
            dataType: "json",
            success: function (res) {
              if (res.code === 200) {  
                window.location.href = "/index";
              }
            }
          })
        } else {
          alert('发布失败')
        }
      }

      //城市评测表
      function softwareGo(){
        let softwareone = $('#softwareone').val();
        let softwaretwo = $('#softwaretow').val();
        let softwarethre = $('#softwarethre').val();
        let softwarefour = $('#softwarefour').val();
        let softwarefive = $('#softwarefive').val();

        if (softwareone.length > 0 && softwaretwo.length > 0 && softwarethre.length >0 && softwarefour.length >0 && softwarefive.length > 0) {
          $.ajax({
            url: "/softwareEvaluationDone",
            type: "POST",
            data: $('#softwareForm').serialize(),
            dataType: "json",
            success: function (res) {
              if (res.code === 200) {  
                window.location.href = "/index";
              }
            }
          })
        } else {
          alert('发布失败')
        }
      }

      //模特评测表
      function modelGo(){
        let modelone = $('#modelone').val();
        let modeltwo = $('#modeltow').val();
        let modelthre = $('#modelthre').val();
        let modelfour = $('#modelfour').val();
        let modelfive = $('#modelfive').val();

        if (modelone.length > 0 && modeltwo.length > 0 && modelthre.length >0 && modelfour.length >0 && modelfive.length > 0) {
          $.ajax({
            url: "/modelEvaluationDone",
            type: "POST",
            data: $('#modelForm').serialize(),
            dataType: "json",
            success: function (res) {
              if (res.code === 200) {  
                window.location.href = "/index";
              }
            }
          })
        } else {
          alert('发布失败')
        }
      }

      //汽车评测表
      function carGo(){
        let carone = $('#carone').val();
        let cartwo = $('#cartow').val();
        let carthre = $('#carthre').val();
        let carfour = $('#carfour').val();
        let carfive = $('#carfive').val();

        if (carone.length > 0 && cartwo.length > 0 && carthre.length >0 && carfour.length >0 && carfive.length > 0) {
          $.ajax({
            url: "/carEvaluationDone",
            type: "POST",
            data: $('#carForm').serialize(),
            dataType: "json",
            success: function (res) {
              if (res.code === 200) {  
                window.location.href = "/index";
              }
            }
          })
        } else {
          alert('发布失败')
        }
      }
      //其他评测
      function staticbackGo(){
        let staticbackname = $('#staticbackname').val();
        let staticbackone = $('#staticbackone').val();
        let staticbacktwo = $('#staticbacktwo').val();
        let staticbackthre = $('#staticbackthre').val();
        let staticbackfour = $('#staticbackfour').val();
        let staticbackfive = $('#staticbackfive').val();

        if (staticbackname.length > 0 && staticbackone.length > 0 && staticbacktwo.length >0 && staticbackthre.length >0 && staticbackfour.length > 0 && staticbackfive.length > 0) {
          $.ajax({
            url: "/staticbackEvaluationDone ",
            type: "POST",
            data: $('#staticbackForm').serialize(),
            dataType: "json",
            success: function (res) {
              if (res.code === 200) {  
                window.location.href = "/index";
              }
            }
          })
        } else {
          alert('发布失败')
        }
      }
    </script>
</body>

</html>